from django.conf.urls import url

from index.views import IndexView
from operation.views import MyCourseView, MyFavOrgView, MyFavTeacherView, MyFavCourseView, MyMessageView
from last.views import UploadImageView
from organization.views import TeacherDetailView
from organization.views import TeacherListView
from .views import RegisterView, LoginView, ForgetPwdView, User_infoView, ResetView, LogoutView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^image/upload/$', User_infoView.as_view(), name='image_upload'),  # 用户信息
    url(r'^register/$', RegisterView.as_view(), name='register'),  # 注册
    url(r'^login/$', LoginView.as_view(), name='login'),  # 登录
    url(r'^info/$', UploadImageView.as_view(), name='user_info'),  # 修改用户信息
    url(r'^forget/$', ForgetPwdView.as_view(), name='forget_pwd'),  # 忘记密码
    url(r'^mycourse/$', MyCourseView.as_view(), name='mycourse'),  # 我的课程
    url(r'^myfav_org/$', MyFavOrgView.as_view(), name='myfav_org'),  # 我的收藏
    url(r'^myfav/teacher/$', MyFavTeacherView.as_view(), name='myfav_teacher'),  # 授课教师
    url(r'^myfav/course/$', MyFavCourseView.as_view(), name='myfav_course'),  # 公开课程
    url(r'^mymessage/$', MyMessageView.as_view(), name='mymessage'),  # 用户中心-我的消息
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(), name='reset_pwd'),
    url(r'^modify_pwd/$', ResetView.as_view(), name='modify_pwd'),
    url(r'^teacher_list/$', TeacherListView.as_view(), name="teacher_list"),  # 授课教师
    # url(r'^teacher_detail/', TeacherDetailView.as_view(), name="teacher_detail"),  # 授课教师
    url(r'^logout/$', LogoutView.as_view(), name='logout'),  # 退出登录

]
